#lang racket

(define (abs n)
  (cond
    [(< n 0) (- 0 n)]
    [else n])
  )

(define (random-n-m n m)
  (+ (random (abs (- m n))) n)
  )

;
(define (dec n)
  (- n 1)
  )

(define (check-param n low high)
  (cond
      [(or (< low 0) (< high 0) (< n 0)) false]
      [(< high low) false]
      [else true])
  )

(define (in-range value low high)
  (cond
  [(and (>= value low) (<= value high)) true]
  [else false])
  )

(define (generate-temps n low high)
  (cond
    [(zero? n) empty]
    [else (define temp (random high))
          (cond
            [(in-range temp low high) 
             (cons temp (generate-temps (dec n) low high))]
            [else (generate-temps n low high)])
          ]
    )
  )

(define (create-temps n low high)
    (cond
     [(check-param n low high) 
      (generate-temps n low high)]
     [else empty])
  )

; Test
(random-n-m 5 10)
(create-temps 100 9 1000)
